<?php
function __autoload($class_name) {
    include '../class/' . $class_name . '.php';
}
?>
<?php include("functions.php"); ?>
<?php include("connection.php"); ?>
<?php $settings = new Settings(); ?>

<?php
	$q = "SELECT user, pg, sg, sf, pf, c, capt FROM fts_tim WHERE kolo = " . ($settings->currentRound-1);
	$r = mysql_query($q);
	while ($n = mysql_fetch_array($r)) {
		$q1 = "INSERT INTO fts_tim (user, kolo, pg, sg, sf, pf, c, capt) VALUES (" .
				"'".$n['user']."', ".
				"'".($settings->currentRound)."', ".
				"'".$n['pg']."', ".
				"'".$n['sg']."', ".
				"'".$n['sf']."', ".
				"'".$n['pf']."', ".
				"'".$n['c']."', ".
				"'".$n['capt']."'".
				")";
		if (mysql_query($q1)) echo "Uspesno: ". $n['user'] . "<br />";
	}
?>